package net.hn.hnms.biz.cockpit.domain;


import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;

import javax.persistence.Table;
import java.util.Date;

@Data
@NoArgsConstructor
@ExcelIgnoreUnannotated
@EqualsAndHashCode(callSuper=false)
@Table(name = "workflow_system", schema = "cockpit", catalog = "huaneng-cockpit")
@ApiModel(value = "业务系统")
public class WorkflowSystem {

    @ApiModelProperty(value = "id")
    @TableField(value = "id", fill = FieldFill.INSERT)
    private String id;


    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "Asia/Shanghai")
    @ApiModelProperty(value = "数据加工时间")
    private Date checkPeriod;

    @ApiModelProperty(value = "流程待办")
    private Integer processToBeDone;

    @ApiModelProperty(value = "流程已办")
    private Integer processDone;

    @ApiModelProperty(value = "流程完成")
    private Integer processCompletion;

    @ApiModelProperty(value = "矿编码")
    private String mineCode;

    public Integer getProcessToBeDone() {
        if (processToBeDone == null)
            return 0;
        return processToBeDone;
    }

    public Integer getProcessDone() {
        if (processDone == null)
            return 0;
        return processDone;
    }

    public Integer getProcessCompletion() {
        if (processCompletion == null)
            return 0;
        return processCompletion;
    }
}
